<?php if (!empty($events_data)) { ?>
  <div style="background-color: white;">
    <div class="event">
      <div class="date">
        <h4><?php echo date('d - F - Y', strtotime($date_data)); ?></h4>
      </div>
    </div>
    <?php foreach ($events_data as $event) { ?>
      <?php if ($event['type'] == 1) { ?>
        <div class="event">
          <div class="date success">
            <a href="<?php echo base_url('profile/' . $event['user_name']); ?>"><img title="<?php echo $event['user_display_name']; ?>" src="<?php echo base_url('assets/photos/' . $event['user_image']); ?>" class="img-rounded pull-left" style="max-height: 60px; max-width: 60px;"/></a>
          </div>
          <?php if (date('d-M', strtotime($event['date'])) == date('d-M')) { ?>
            <?php if ($this->current_user['user_id'] == $event['user_id']) { ?>
              <a title="Goto my wall <?php echo $event['user_name']; ?>" style="text-decoration: none; float: right; color: yellowgreen; margin-right: 10px; margin-top: 5px;" href="<?php echo base_url('wall/' . $event['user_name']); ?>">[ See Wishes ]</a>
            <?php } else { ?>
              <a title="Its today, wish <?php echo $event['user_name']; ?>" style="text-decoration: none; float: right; color: yellowgreen; margin-right: 10px; margin-top: 5px;" href="<?php echo base_url('wall/' . $event['user_name']); ?>">[ Wish ]</a>
            <?php } ?>
          <?php } ?>
          <a style="text-decoration: none;" href="<?php echo base_url('profile/' . $event['user_name']); ?>">
            <h4>
              <?php echo $event['user_display_name']; ?>
              &nbsp;<span style="color: #777; font-size: smaller;">(@<?php echo $event['user_name']; ?>)</span>
              &nbsp;
              <?php if (is_online($event['user_id'])) { ?>
                <img src="<?php echo site_url('assets/img/online_button_tiny.png'); ?>" title="Online"/>
              <?php } else { ?>
                <img src="<?php echo site_url('assets/img/offline_button_tiny.png'); ?>" title="Offline"/>
              <?php } ?>
            </h4>
          </a>
          <p><i class="icon-gift"></i>&nbsp;Birthday</p>
        </div>
      <?php } ?>
      <?php if ($event['type'] == 2) { ?>
        <div class="event">
          <div class="date warning">
            <a href="<?php echo base_url('profile/' . $event['user_name']); ?>"><img title="<?php echo $event['user_display_name']; ?>" src="<?php echo base_url('assets/photos/' . $event['user_image']); ?>" class="img-rounded pull-left" style="max-height: 60px; max-width: 60px;"/></a>
          </div>
          <?php if (date('d-M', strtotime($event['date'])) == date('d-M')) { ?>
            <?php if ($this->current_user['user_id'] == $event['user_id']) { ?>
              <a title="Goto my wall <?php echo $event['user_name']; ?>" style="text-decoration: none; float: right; color: yellowgreen; margin-right: 10px; margin-top: 5px;" href="<?php echo base_url('wall/' . $event['user_name']); ?>">[ See Wishes ]</a>
            <?php } else { ?>
              <a title="Its today, wish <?php echo $event['user_name']; ?>" style="text-decoration: none; float: right; color: yellowgreen; margin-right: 10px; margin-top: 5px;" href="<?php echo base_url('wall/' . $event['user_name']); ?>">[ Wish ]</a>
            <?php } ?>
          <?php } ?>
          <a style="text-decoration: none;" href="<?php echo base_url('profile/' . $event['user_name']); ?>">
            <h4>
              <?php echo $event['user_display_name']; ?>
              &nbsp;<span style="color: #777; font-size: smaller;">(@<?php echo $event['user_name']; ?>)</span>
              &nbsp;
              <?php if (is_online($event['user_id'])) { ?>
                <img src="<?php echo site_url('assets/img/online_button_tiny.png'); ?>" title="Online"/>
              <?php } else { ?>
                <img src="<?php echo site_url('assets/img/offline_button_tiny.png'); ?>" title="Offline"/>
              <?php } ?>
            </h4>
          </a>
          <p><i class="icon-briefcase"></i>&nbsp;Joined Innovature (<?php echo time_ago($event['date']); ?>)</p>
        </div>
      <?php } ?>
      <?php if ($event['type'] == 3) { ?>
        <div class="event">
          <div class="date danger">
            <a href="<?php echo base_url('profile/' . $event['user_name']); ?>"><img title="<?php echo $event['user_display_name']; ?>" src="<?php echo base_url('assets/photos/' . $event['user_image']); ?>" class="img-rounded pull-left" style="max-height: 60px; max-width: 60px;"/></a>
          </div>
          <a style="text-decoration: none;" href="<?php echo base_url('profile/' . $event['user_name']); ?>">
            <h4>
              <?php echo $event['user_display_name']; ?>
              &nbsp;<span style="color: #777; font-size: smaller;">(@<?php echo $event['user_name']; ?>)</span>
              &nbsp;
              <?php if (is_online($event['user_id'])) { ?>
                <img src="<?php echo site_url('assets/img/online_button_tiny.png'); ?>" title="Online"/>
              <?php } else { ?>
                <img src="<?php echo site_url('assets/img/offline_button_tiny.png'); ?>" title="Offline"/>
              <?php } ?>
            </h4>
          </a>
          <p style="margin-left: 100px; word-break: break-all;"><i class="icon-certificate"></i>&nbsp;<?php echo substr($event['event_msg'], 0, 250) . '...'; ?></p>
        </div>
      <?php } ?>
    <?php } ?>
  </div>
<?php } ?>